locworldwarpfandomcom-20200214-history
Extension Tutorials
Editing the Templates As you can see, we've changed the wiki such that it uses templates now instead of laborious copy/paste. While great from a front-end perspective, for anyone wishing to actually tweak what is happening, a few conventions are needed. *To actually change the template, go to /Preload. So, the preload for a nation is located at . *To change the descriptions of what goes in each spot, go to /Intro. So, as above, the intro for a nation is located at Special Extensions Enabled on this wiki There are two non-standard extensions that we have enabled for this wiki that, hopefully, will provide a lot of useful functionality and visualizations of what we're doing here. MapLib Maplib is a tool that allows us to turn any image we wish to into an editable googlemaps-like map. To begin, please register (for free) on the site. This will allow you to edit and modify the maps. Uploading a map is simple. Simply click make, the upload in the top left menu. This will direct you to a page where you can name the map and upload it. In general, please let at least registered members add markers to the map (otherwise you'll be the only person who can do anything with it!) After uploading, you can view it, create new categories of points for it, etc, etc with a fairly intuitive interface. To get it onto the wiki is also quite simple. Here's a map I made for Lightvoid... Its Renissa, Brinn's plane. 6773 To create this in the wiki, here is the syntax that you need to put into the page: 6773 Where Width and Height are in pixels. The number between the tags (the <> parts) is the map number. When you look at a maplib webaddress, it will look like this: http://www.maplib.net/map.php?id=6773 The number past the id= is what you want to put into the maplib tag. And with that, you're done! Hopefully we'll be able to use this system to our advantage in the coming months. Timeline This extension allows users to create a timeline... for whatever reason they might want to create one. This tutorial is FAR more detailed than the MapLib tutorial, although I imagine this will probably be used less (I have a dream of putting this up associated with our game history page and cataloguing the rise and fall of our nations in that way). For all the syntactic possibilities, look at http://www.mediawiki.org/wiki/Extension:EasyTimeline/syntax Example Timeline: ImageSize = width:160 height:550 PlotArea = width:50 height:530 left:50 bottom:10 DateFormat = yyyy Period = from:1919 till:1991 TimeAxis = orientation:vertical ScaleMajor = unit:year increment:5 start:1920 # there is no automatic collision detection, # so shift texts up or down manually to avoid overlap Define $dx = 25 # shift text to right side of bar PlotData= bar:Leaders color:red width:25 mark:(line,white) align:left fontsize:S from:start till:1922 shift:($dx,15) text:Vladimir~Ilyich~Lenin from:1922 till:1953 shift:($dx,5) text:Josef Stalin from:1953 till:1964 shift:($dx,5) text:Nikita~Khrushchev from:1964 till:1982 shift:($dx,5) text:Leonid~Brezhnev from:1982 till:1984 shift:($dx,-12) text:Yuri~Andropov from:1984 till:1985 shift:($dx,4) text:Konstantin~Chernenko fontsize:XS from:1985 till:end shift:($dx,10) text:Mikhail~Gorbachev The Code for this is as follows: ImageSize = width:160 height:550 PlotArea = width:50 height:530 left:50 bottom:10 DateFormat = yyyy Period = from:1919 till:1991 TimeAxis = orientation:vertical ScaleMajor = unit:year increment:5 start:1920 # there is no automatic collision detection, # so shift texts up or down manually to avoid overlap Define $dx = 25 # shift text to right side of bar PlotData= bar:Leaders color:red width:25 mark:(line,white) align:left fontsize:S from:start till:1922 shift:($dx,15) text:Vladimir~Ilyich~Lenin from:1922 till:1953 shift:($dx,5) text:Josef Stalin from:1953 till:1964 shift:($dx,5) text:Nikita~Khrushchev from:1964 till:1982 shift:($dx,5) text:Leonid~Brezhnev from:1982 till:1984 shift:($dx,-12) text:Yuri~Andropov from:1984 till:1985 shift:($dx,4) text:Konstantin~Chernenko fontsize:XS from:1985 till:end shift:($dx,10) text:Mikhail~Gorbachev Lets start going through this piece by piece: The most important tags to keep in mind are the and tags. These are what actually tell wiki to create a timeline. After that comes several lines of code basically telling the extensions how big to make the timeline. Like MapLib, this is in pixels, so... watch out for that. The Image Size tells it how big of a box to make, the PlotArea tells it how big you want the margins. The next block tells it how you want to lay out the timeline. In the case above, you're going to have 4 digit years, no days and no months. The Timeline will go from 1919 to 1991, it will be vertical as opposed to horizontal, and it will have tickmarks and labels for the years every 5 years starting at 1920. The next two lines are known as comments, and are denoted with a #. anything past that # will not be read by the program, so you can leave helpful notes (like the one there, which tells us that we need to manually move the text. The next line creates a variable and sets its value to 25. This is very useful because we might want to make the shift 30 instead of 25, and now we only need to change the value once. The $ sign tells the software that this is a variable, and not you just typing something. And finally, we get into the meat of the timeline program. So far we have laid out the basics of our timeline... how big it is, how long it is, etc, etc, but we haven't put anything actually on it! The PlotData= line tells the extension that you are about to put real data on the map. Each PlotData= represents a new entry in the timeline (so, two nations that are around at the same time will need two PlotData= lines) The next line tells the program a variety of things. It tells it that it is a bar graph, that the bar graph is labeled "Leaders", that it is red, that it is 25 pixels wide, that the marks that you are going to make on it (more on that soon) will be denoted with white lines, that it will align the text to the left (this is optional), and that the fontsize will be S for "Small" (takes XS, S, M, L, XL). Then, you actually put the data in. the from/till tells the program where to put lines denoting the start and end of the time period, the shift tells it how much to displace the text (see the $dx that was defined earlier?) in (x,y) format, and then the text: tells it exactly what to write. In this extension's syntax, ~ stands for linebreak, so if you want to put multiple lines of text with a particular entry, that is what you need to use. Something a little more complex Okay, so, now lets take a look at a more complex example: ImageSize = width:1060 height:600 PlotArea = width:600 height:530 left:50 bottom:25 DateFormat = yyyy Period = from:1000 till:1025 TimeAxis = orientation:vertical ScaleMajor = unit:year increment:5 start:1000 # there is no automatic collision detection, # so shift texts up or down manually to avoid overlap Define $dx = 25 # shift text to right side of bar PlotData= bar:Mishway color:red width:25 mark:(line,white) align:left fontsize:S from:start till:1000 shift:($dx,15) text:Mishway discovered by Syreene. from:1000 till:1010 shift:($dx,5) text:The Monarch appears. from:1010 till:1015 shift:($dx,5) text:Djaf enters Mishway. from:1015 till:end shift:($dx,5) text:Ritreaude enters Mishway. bar:Culthet color:red width:25 mark:(line,black) align:left fontsize:S from:start till:end color:blue at:1002 shift:($dx,15) text:Itja-Rek crashes onto Culthet which looks like: ImageSize = width:1060 height:600 PlotArea = width:600 height:530 left:50 bottom:25 DateFormat = yyyy Period = from:1000 till:1025 TimeAxis = orientation:vertical ScaleMajor = unit:year increment:5 start:1000 # there is no automatic collision detection, # so shift texts up or down manually to avoid overlap Define $dx = 25 # shift text to right side of bar PlotData= bar:Mishway color:red width:25 mark:(line,white) align:left fontsize:S from:start till:1000 shift:($dx,15) text:Mishway discovered by Syreene. from:1000 till:1010 shift:($dx,5) text:The Monarch appears. from:1010 till:1015 shift:($dx,5) text:Djaf enters Mishway. from:1015 till:end shift:($dx,5) text:Ritreaude enters Mishway. bar:Culthet width:25 mark:(line,black) align:left fontsize:S from:start till:end color:blue at:1002 shift:($dx,15) text:Itja-Rek crashes onto Culthet So, this is a little bit more detailed, but many things should look familiar. Note that we've increased the width of the timeline to accommodate another bar, but beyond that everything is roughly the same. Just put your info in the right place and it will go to the proper bar. Category:Templates and Help